package com.zyc.app.woa.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.zyc.app.woa.R;
import com.zyc.app.woa.data.AccountInfo;

/**
 * Author: yingchang.zhang
 * Date  : 2014/12/24
 */
public class AccountDetailDialog extends PopDialog {
    private TextView mContentText;
    private Button mOkButton;
    private AccountInfo mAccountInfo;

    public AccountDetailDialog(Context context, AccountInfo accountInfo) {
        super(context);
        mAccountInfo = accountInfo;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.account_detail_dialog);
        mOkButton = (Button) findViewById(R.id.ok_button);
        mContentText = (TextView) findViewById(R.id.detail_text);
        mContentText.setText(mAccountInfo.desc);
        setCanceledOnTouchOutside(true);
        mOkButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }
}
